#ifndef __UTILS_H__
#define __UTILS_H__

#include <GLFrame.h>
#include <GLTools.h>
#include <vector>

struct point_light
{
	GLfloat position[3];
	GLfloat color[3];
	float attenuation0;
	float attenuation1;
	float attenuation2;
	float angle;
};

struct material_properties
{
	GLfloat ambient_color[3];
	GLfloat diffuse_color[3];
	GLfloat specular_color[3];
	float specular_exponent;
};

void TriangleFace(const M3DVector3f a, const M3DVector3f b, const M3DVector3f c);
void SetUpFrame(GLFrame &frame, const M3DVector3f origin,
				const M3DVector3f forward,	const M3DVector3f up);
void LookAt(GLFrame &frame, const M3DVector3f eye,
			const M3DVector3f at,
			const M3DVector3f up);
void DrawGrid(GLfloat xMin, GLfloat yMin, GLfloat xMax, GLfloat yMax, GLint n, GLfloat z); 
void DrawPyramide(void);
void DrawFloor(GLfloat xMin, GLfloat yMin, GLfloat xMax, GLfloat yMax);
void GetUniformLocationExt(GLint *var, const char *name);

int ReadVertices(std::vector<float> &vector);
int ReadWalls(std::vector<GLint> &vector);

#endif /*__UTILS_H__*/